<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Tax_model extends CI_Model
{
	
	public function __construct()
	{
		parent::__construct();
		$data=array();

	} 	
		
	public function create_user_type($insert)
	{
		$this->db->insert('user_type',$insert);
	}
	
	public function create_department($insert)
	{
		$this->db->insert('department',$insert);
	}
	
	public function add_tax($name,$amount,$additional_data){
		
		$data = array(
			    'name'   => $name,
				'amount' =>$amount,		
		 );
		$this->db->insert('tax',$data);
			
}
		
	public function get_tax(){
		
		$query = $this->db->get('tax');

		return $query;
	}	



	public function get(){
	   $this->datatables
			->select("id,name,amount")
			->from("tax")		
			->add_column("Actions", 
			"<center>			<a href='edit_tax/$1'>
								<i class='icon-edit'></i>
								</a>
							    <a href='delete_tax/$1' onClick=\"return confirm('". 'Do u Want to delete Tax!' ."')\">
								<i class='icon-trash'></i>
								</a></center>", "id")
			->unset_column('id');
		
		
	   return  $this->datatables->generate();
	
}	





}
